<include file="Public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
  <include file="Public/breadcrumb"/>
  <style type="text/css">
  	.table input{display: nones;}
	#biaozhu{cursor: pointer;}
	#yc{color:red; display: nones;}
  </style>
   <script type="text/javascript">
   jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件  
   return this.each(function(){ 
   var that; 
   $('tr', this).each(function(row) { 
   $('td:eq('+colIdx+')', this).filter(':visible').each(function(col) { 
   if (that!=null && $(this).html() == $(that).html()) { 
   rowspan = $(that).attr("rowSpan"); 
   if (rowspan == undefined) { 
   $(that).attr("rowSpan",1); 
   rowspan = $(that).attr("rowSpan"); } 
   rowspan = Number(rowspan)+1; 
   $(that).attr("rowSpan",rowspan); 
   $(this).hide(); 
   } else { 
   that = this; 
   } 
   }); 
   }); 
   }); 
   }
   
 
   
   </script>
  <section class="content">
    <div class="container-fluid">
      <div class="panel panel-default"> 
        <div class="panel-heading"> 
          <h3 class="panel-title"><i class="fa fa-list"></i>抵扣明细</h3>
        </div>
        <div class="panel-body">
          <div id="ajax_return" class="g_list"> 
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
								<th class="sorting text-center">订单号</th>
								<th class="sorting text-center">商户名</th>
								<th class="sorting text-center">司机</th>
                                <th class="sorting text-center">客户名</th>
								<th class="sorting text-center">订单价</th>
								<th class="sorting text-center">优惠金额</th>
								<th class="sorting text-center">客户应收</th>
								<th class="sorting text-center">包装件数</th>
								<th class="sorting text-center">入库时间</th>
								<th class="sorting text-center">在线支付</th>
								<th class="sorting text-center">配送时间</th>
								<th class="sorting text-center">支付时间</th>

                            </tr>
                            </thead>

                            <tbody id="tbody">

							<volist name="list" id="vs">
								<?php
									$class=$vs['ruku']!=$vs['chuku'] ? '#e8e62d' : '';
									?>
								<tr style="background:{$class}">

									<td class="text-center">
										<a href="javascript:" id="chakan" rel="{$vs.order_id}" rev="{$vs.store_id}">
											{$vs.order_sn}
										</a>
									</td>
									<td class="text-center">
										{$vs.store_name}
									</td>
									<td class="text-center">
										{$vs.driver_name}
									</td>
									<td class="text-center">
										（{$vs.biaoshi_xian}）{$vs.company}<span id="yc">{$vs.user_id}</span>
									</td>
									<td class="text-center"><span style="color:#f39c12;">{$vs.order_amount}<span id="yc">{$vs.user_id}</span></span></td>
									<td class="text-center"><span style="color:#268e0c;">{$vs.coupon_price}</span></td>
									<td class="text-center"><span id="yc">{$vs.xiaoji}</span></td>
									<td class="text-center"><b>{$vs.chuku}件</b></td>
									<td class="text-center"><b>{$vs.ruku_last_time|date='Y-m-d H:i',###}</b></td>

									<td class="text-center"><?php
									if($vs['pay_status']==1)
										echo '<span style="color:green">已支付</span>';
										else
										echo '<span style="color:red">未支付</span>';
										?></td>


									<?php
									if($vs['driver_time']!=0){
									?>
									<td class="text-center"><span>{$vs['driver_time']|date="Y-m-d H:i:s",###}</span></td>
									<?php
									}else{
										echo '<td class="text-center"><span>-</span></td>';
									}
									?>

									<?php
									if($vs['pay_time']!=0){
									?>
									<td class="text-center"><span>{$vs['pay_time']|date="Y-m-d H:i:s",###}</span></td>
									<?php
									}else{
										echo '<td class="text-center"><span>-</span></td>';
									}
									?>

								</tr>
							</volist>
							<tr>
								<td colspan="4" align="right"><b>合计：</b></td>
								<td style="font-size: 15px;color: #f39c12;font-size: 16px;">￥{$sum_price}</td>
								<td style="font-size: 15px;color: blue;font-size: 16px;">￥{$coupon_price}</td>
								<td  style="font-size: 15px;color: red;font-size: 16px;">￥{$heji_price}</td>
								<td align="right"></td>
								<td align="right"></td>
								<td align="right"></td>
								<td align="right"></td>
								<td align="right"></td>
							</tr>
                            </tbody>
                        </table>
                    </div>
          </div>
        </div>
      </div>
    </div>


    <!-- /.row -->
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
 <script>
	$(document).ready(function() {

$(".table-responsive #chakan").click(function(){
				var myrel=$(this).attr('rel');
				var myrul='/index.php/Admin/order/detail/order_id/'+myrel;//+myrel;
				layer.open({
					type: 2,
					shadeClose: true, //点击遮罩关闭
					title:'商家产品信息',
					skin: 'layui-layer-rim', //加上边框
					area: ['80%', '80%'], //宽高
					content: myrul
				});
				});

});
 </script>
</body>
</html>